<template>
  <div class="swiper-container" ref="content">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <slot></slot>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from "swiper";
import "swiper/swiper.min.css";

export default {
  data() {
    return {
      swiper: null,
    };
  },
  mounted() {
    setTimeout(() => {
      this.swiper = new Swiper(this.$refs.content, {
        direction: "horizontal",
        roundLengths: true,
        slidesPerView: "auto",
        freeMode: true,
        mousewheel: true,
      });
    }, 1000);
  },
};
</script>

<style lang="scss" scoped>
.swiper-container {
  width: 100%;
  .swiper-slide {
    width: auto;
    ::v-deep {
      .coupon-item {
        display: inline-block;
        line-height: 26px;
      }
    }
  }
}
</style>
